CREATE OR REPLACE function sst_watchdog(sqsWatchdog IN OUT VARCHAR2) return NUMBER AS
/**
 * Creates or handles watchdog telegram.
 * @param sqsWatchdog Watchdog telegram content
 * @return 1 if is watchdog, -1 if not
 */
begin
  if(sqsWatchdog is null) then
    sqsWatchdog := 'DB_WATCHDOG';
  	return 1;
	else 
	  if(sqsWatchdog = 'DB_WATCHDOG') then
		  return 1;
		else
		  return -1;
		end if;		
	end if;	
end sst_watchdog;
/
